﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace XtremBiking.Web.Models.Solicitudes
{
    public class RegistrarSolicitud
    {
        [Display(Name = "DisplayName", ResourceType = typeof(Recursos.Modelos.Solicitudes.RegistrarSolicitud))]
        [Required(AllowEmptyStrings = false, ErrorMessageResourceName = "NameRequired", ErrorMessageResourceType = typeof(Recursos.Modelos.Solicitudes.RegistrarSolicitud))]
        [StringLength(100, ErrorMessageResourceName = "NameMaxChars", ErrorMessageResourceType = typeof(Recursos.Modelos.Solicitudes.RegistrarSolicitud))]
        public string Nombre { get; set; }

        [Required(AllowEmptyStrings = false, ErrorMessageResourceName = "EmailRequired", ErrorMessageResourceType = typeof(Recursos.Modelos.Solicitudes.RegistrarSolicitud))]
        [DataType(DataType.EmailAddress)]
        [RegularExpression(@"\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*", ErrorMessageResourceName = "EmailNotValid", ErrorMessageResourceType = typeof(Recursos.Modelos.Solicitudes.RegistrarSolicitud))]
        [Display(Name = "DisplayEmail", ResourceType = typeof(Recursos.Modelos.Solicitudes.RegistrarSolicitud))]
        [StringLength(50, ErrorMessageResourceName = "MailMaxChars", ErrorMessageResourceType = typeof(Recursos.Modelos.Solicitudes.RegistrarSolicitud))]
        //[Remote("EmailAvailable", "Solicitud", ErrorMessageResourceName = "EmailRegistered", ErrorMessageResourceType = typeof(Recursos.Modelos.Solicitudes.RegistrarSolicitud))]
        public string Mail { get; set; }

        [Required(AllowEmptyStrings = false, ErrorMessageResourceName = "TelephoneRequired", ErrorMessageResourceType = typeof(Recursos.Modelos.Solicitudes.RegistrarSolicitud))]
        [DataType(DataType.PhoneNumber)]
        [Display(Name = "DisplayTelephone", ResourceType = typeof(Recursos.Modelos.Solicitudes.RegistrarSolicitud))]
        [StringLength(50, ErrorMessageResourceName = "TelephoneMaxChars", ErrorMessageResourceType = typeof(Recursos.Modelos.Solicitudes.RegistrarSolicitud))]
        public string Telefono { get; set; }

        [Required(AllowEmptyStrings = false, ErrorMessageResourceName = "CelularRequired", ErrorMessageResourceType = typeof(Recursos.Modelos.Solicitudes.RegistrarSolicitud))]
        [DataType(DataType.PhoneNumber)]
        [Display(Name = "DisplayCelular", ResourceType = typeof(Recursos.Modelos.Solicitudes.RegistrarSolicitud))]
        [StringLength(50, ErrorMessageResourceName = "CelularMaxChars", ErrorMessageResourceType = typeof(Recursos.Modelos.Solicitudes.RegistrarSolicitud))]
        public string Celular { get; set; }

        [Display(Name = "DisplayCometarios", ResourceType = typeof(Recursos.Modelos.Solicitudes.RegistrarSolicitud))]
        [Required(AllowEmptyStrings = false, ErrorMessageResourceName = "ComentariosRequired", ErrorMessageResourceType = typeof(Recursos.Modelos.Solicitudes.RegistrarSolicitud))]
        [StringLength(2000, ErrorMessageResourceName = "ComentariosMaxChars", ErrorMessageResourceType = typeof(Recursos.Modelos.Solicitudes.RegistrarSolicitud))]
        [DataType(DataType.MultilineText)]
        public string Comentarios { get; set; }

        [Display(Name = "DisplaySolicitudType", ResourceType = typeof(Recursos.Modelos.Solicitudes.RegistrarSolicitud))]
        [Required(AllowEmptyStrings = false, ErrorMessageResourceName = "SolicitudTypeRequired", ErrorMessageResourceType = typeof(Recursos.Modelos.Solicitudes.RegistrarSolicitud))]
        public XtremBiking.Logica.Enumerados.Solicitudes.TipoSolicitud TipoSolicitud { get; set; }

    }
}